p = theparser();

eqtn = { ...
    'x{-1+1} - y{0} + z{-4} + x{10+10}', ...
    'x{0} + y{-0} + z{-0+1-1}', ...
    'x{0} + y{+-5} + z{+1}', ...
    'x{t-1} + y{t+4-4} + z{t+10}', ...
    'x{0+}', ...
    };
eqtn = strrep(eqtn,' ','');
[actEqtn,actMaxT,actMinT,actValidTimeSubs] = evaltimesubs(p,eqtn);

expEqtn = { ...
    'x - y + z{@-4} + x{@+20}', ...
    'x + y + z', ...
    'x + y{@-5} + z{@+1}', ...
    'x{@-1} + y + z{@+10}', ...
    'x', ...
};
expEqtn = strrep(expEqtn,' ','');
expMaxT = 20;
expMinT = -5;
expValidTimeSubs = [true,true,true,true,false];

myassert(actEqtn,expEqtn);
myassert(actMaxT,expMaxT);
myassert(actMinT,expMinT);
myassert(actValidTimeSubs,expValidTimeSubs);
